package exercise4;
import java.util.Scanner;

public class Matrix extends BaseExample{

	public void printMatrix(int l) {
		int[][] a=new int[l][l];
		StringBuilder str=new StringBuilder();
		str.append("\n");
		for(int i=0;i<a.length;i++) {
			for(int j=0;j<a.length;j++) {
				str.append("1 ");
			}
			str.append("\n");
		}
		this.logger.info(str);
		
	}
	@SuppressWarnings("resource")
	public void printForMatrix() {
		this.logger.debug("请输入矩阵行数/列数：");
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		printMatrix(n);
	}

}
